package com.guigu.user.controller;


import com.guigu.user.entity.City;
import com.guigu.user.service.CityService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author TaoLong
 * @since 2021-11-11
 */
@RestController
@RequestMapping("/user/city")
public class CityController {

    @Autowired
    private CityService cityService;

    /**
     * 获取当前地址簿所有的城市信息
     * @return
     */
    @ApiOperation("获取当前地址簿所有的城市信息")
    @GetMapping("/getAllCity")
    public List<City> getAllCity() {
        return cityService.list(null);
    }
}

